package net.zjitc.service.impl;

import net.zjitc.mapper.DepartmentMapper;
import net.zjitc.pojo.Department;
import net.zjitc.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0
 * @autho dell
 * @date 2018/5/17
 */
@Service
@Transactional
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    private DepartmentMapper departmentMapper;
    @Override
    public List<Department> findAll() {
        return departmentMapper.findAll();
    }

    @Override
    public Department findById(int id) {
        return departmentMapper.findById(id);
    }
}
